<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <span>请输入：</span>
        <input type="text" v-model.number.lazy='money' ><br>
        <span>需要交所得税：</span>
        <span>{{fan}}</span>
    </div>
    <script src="./js/vue.js"></script>
    <script>
        const ve = new Vue({
            el:'#app',
            data:{
                money:0,
                fan:0
            },
            watch:{
                money(val){
                    if(val<1500) {
                        return this.fan=0
                    } else if(val<=4500) {
                        return this.fan = 105
                    } else if(val<=9000) {
                        return this.fan = 105 + 555
                    } else if(val<=35000) {
                        return this.fan = 105+555+1005
                    } else if(val<=55000) {
                        return this.fan = 105+555+1005+2755
                    } else if(val<=80000) {
                        return this.fan = 105+555+1005+2755+5505
                    } else {
                        return this.fan = 105+555+1005+2755+5505+13505
                    }
                }
            }
        })
    </script>
</body>
</html>